﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace Kinlo.UI.Main.Converter
{
    class JudgeTypeConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value != null)
            {
                bool r = false;
                if (bool.TryParse(value.ToString(), out r))
                {
                    if (r)
                    {
                        return "保液量";
                    }
                    else
                    {
                        return "标准量";
                    }
                }
                else
                {
                    return "";
                }
            }
            return "";
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
